# Contributor: Drew DeVault <sir@cmpwn.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=brltty
pkgver=6.5
pkgrel=0
pkgdesc="Refreshable braille display driver daemon"
url="http://brltty.app"
arch="all !ppc64le"
license="LGPL-2.1-or-later"
makedepends="
	autoconf
	automake
	gettext-dev
	gpm-dev
	icu-dev
	liblouis-dev
	linux-headers
	tcl
	"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-lang"
source="http://brltty.app/archive/brltty-$pkgver.tar.xz"
options="!check" # no upstream test suite

prepare() {
	default_prepare
	cp /usr/share/abuild/config.guess acdir/
	cp /usr/share/abuild/config.sub acdir/
	./autogen
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-tables-directory=/usr/share/brltty \
		--enable-gpm
	make
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	install -m644 -D Documents/$pkgname.conf \
		"$pkgdir"/etc/$pkgname.conf
}

sha512sums="
bbfbb89b1c3ba5063ad3bc0aa97b859dd23acea1feb79dab20c57dc74ff2f26649942fcecc7030a3f70555596f4d9d35cd05616af2a8e101d4d56b4c471a6ad3  brltty-6.5.tar.xz
"
